package apt.bean;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "TBDVDS")
public class DVDBean implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8134687230892857638L;

	@Id
	@Column(name = "DVDID")
	private String dvdID;
	
	@Column(name = "PRICE")
	private float price;
	
	@Column(name = "Title")
	private String title;
	
	@Column(name = "DVDNAME")
	private String dvdName;
	
	@Column(name = "QUANTITY")
	private int quantity;
	
	@Column(name = "IMAGE")
	private String image;
	
	@Column(name = "DESCRIPTION")
	private String description;
	
	@Column(name = "LINK")
	private String link;
	
	@Column(name = "DATE")
	private Date date;
	
	@Column(name = "STATUS")
	private boolean status;

	@OneToMany(mappedBy = "dvdBean")
	private Set<SongBean> songBeans;
	
	@ManyToOne
	@JoinColumn(name = "CatID")
	private CategoryBean categoryBean;
	
	@ManyToOne
	@JoinColumn(name = "ProducerID")
	private ProducerBean producerBean;
	
	@ManyToOne
	@JoinColumn(name = "SupID")
	private SupplierBean supplierBean;
	
	@OneToMany(mappedBy = "dvdBean")
	private Set<OrderDetailBean> orderDetailBeans;
	
	public DVDBean(String dvdID, float price, String dvdName, int quantity,
			String image, String description, String link, Date date,
			boolean status) {
		super();
		this.dvdID = dvdID;
		this.price = price;
		this.dvdName = dvdName;
		this.quantity = quantity;
		this.image = image;
		this.description = description;
		this.link = link;
		this.date = date;
		this.status = status;
	}

	public DVDBean() {
		// TODO Auto-generated constructor stub
	}
	
	public String getDvdID() {
		return dvdID;
	}

	public void setDvdID(String dvdID) {
		this.dvdID = dvdID;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public String getDvdName() {
		return dvdName;
	}

	public void setDvdName(String dvdName) {
		this.dvdName = dvdName;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public CategoryBean getCategoryBean() {
		return categoryBean;
	}

	public void setCategoryBean(CategoryBean categoryBean) {
		this.categoryBean = categoryBean;
	}

	public ProducerBean getProducerBean() {
		return producerBean;
	}

	public void setProducerBean(ProducerBean producerBean) {
		this.producerBean = producerBean;
	}

	public SupplierBean getSupplierBean() {
		return supplierBean;
	}

	public void setSupplierBean(SupplierBean supplierBean) {
		this.supplierBean = supplierBean;
	}

	public Set<SongBean> getSongBeans() {
		return songBeans;
	}

	public void setSongBeans(Set<SongBean> songBeans) {
		this.songBeans = songBeans;
	}

	public Set<OrderDetailBean> getOrderDetailBeans() {
		return orderDetailBeans;
	}

	public void setOrderDetailBeans(Set<OrderDetailBean> orderDetailBeans) {
		this.orderDetailBeans = orderDetailBeans;
	}
	
	 
}
